procedure GetDate(var dayOfWeek, month, day, year : integer);

Returns the current day.

Also see:  GetTime  TickCount